package com.example.datedemo2.domain;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

@ApiModel("月类")
@TableName("month_sample")
public class MonthSample {
    // 主键
    private int projectId;

    @ApiModelProperty(value = "monthId", required = true)
    @TableId(type = IdType.ASSIGN_UUID)
    private String monthId;
    // 业务
    @ApiModelProperty(value = "月份", example = "2022-12")
    @DateTimeFormat(pattern = "yyyy-MM")
    @JsonFormat(pattern = "yyyy-MM", timezone = "GMT+8")
    private Date monthNumber;

    @ApiModelProperty(value = "内容", example = "预留的int字段")
    private int monthText;

    public Date getMonthNumber() {
        return monthNumber;
    }

    public void setMonthNumber(Date monthNumber) {
        this.monthNumber = monthNumber;
    }

    public int getProjectId() {
        return projectId;
    }

    public void setProjectId(int projectId) {
        this.projectId = projectId;
    }

    public String getMonthId() {
        return monthId;
    }

    public void setMonthId(String monthId) {
        this.monthId = monthId;
    }

    public int getMonthText() {
        return monthText;
    }

    public void setMonthText(int monthText) {
        this.monthText = monthText;
    }
}
